package com.electronsys.room.service.impl;




import java.util.List;

import com.electronsys.pojo.ComputerCenter;
import com.electronsys.pojo.Log;
import com.electronsys.room.dao.IRoomDao;
import com.electronsys.room.service.IRoomService;

public class RoomServiceImpl implements IRoomService {
	private IRoomDao roomDao;
	private ComputerCenter room;
	public int getRoomCount() {
		int i=roomDao.getRoomCount();
		return i;
	}

	public List getRoomByPage(int start, Integer MAX) {
		List list=roomDao.getRoomByPage(start, MAX);
		
		return list;
	}

	public void setRoomDao(IRoomDao roomDao) {
		this.roomDao = roomDao;
	}

	public ComputerCenter showRoom(Integer ccId) {
		room = roomDao.showRoom(ccId);
		return room;
	}

	public void deleteRoom(Integer ccId,Integer ccState) {
		roomDao.deleteRoom(ccId,ccState);
	}

	public List getEmpId() {
		List list = roomDao.getEmpId();
		return list;
	}

	public List getDeptId() {
		List list = roomDao.getDeptId();
		return list;
	}

	public void saveRoom(Integer ccId,String ccName,Integer department, Integer employee,
			String ccAddr, String ccRemark) {
        roomDao.saveRoom(ccId,ccName,department,employee,ccAddr,ccRemark);		
	}

	public void insertRoom(ComputerCenter room) {
		roomDao.insertRoom(room);
	}

	public List<ComputerCenter> selectroom(Integer ccId, String ccName,
			Integer department, Integer employee, String ccAddr) {
		
		List listroom = roomDao.selectroom(ccId,ccName,department,employee,ccAddr);
		return listroom;
	}

	public void logEmp(Log log) {
		roomDao.logEmp(log);
	}

	
	

}
